<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../img/asset-favico.ico">
    <title>编辑信息</title>
    <link rel="stylesheet" href="../css/page-health-order.css"/>

    <link rel="stylesheet" href="../plugins/elementui/index.css"/>
    <script src="../plugins/jquery/dist/jquery.min.js"></script>
    <script src="../plugins/healthmobile.js"></script>
    <script src="../plugins/datapicker/datePicker.js"></script>
    <script src="../plugins/vue/vue.js"></script>
    <script src="../plugins/vue/axios-0.18.0.js"></script>
    <script src="../plugins/elementui/index.js"></script>
    <script>
        var id = getUrlParam("id");
    </script>
</head>
<body data-spy="scroll" data-target="#myNavbar" data-offset="150">
<div id="app" class="app">
    <!-- 页面头部 -->
    <div class="top-header">
        <span class="f-left"><i class="icon-back" onclick="history.go(-1)"></i></span>
        <span class="center">预约记录</span>
        <span class="f-right"><i class="icon-more"></i></span>
    </div>
    <div style="margin-top: 20px">
        <div class="block" style="margin-left: 100px">
            开始时间：
            <el-date-picker
                    v-model="begin"
                    type="date"
                    placeholder="选择日期">
            </el-date-picker>
        </div>
        <div style="height: 20px"></div>
        <div class="block" style="margin-left: 100px">
            结束时间：
            <el-date-picker
                    v-model="end"
                    type="date"
                    placeholder="选择日期">
            </el-date-picker>
        </div>
        <div style="float: right">
            <button @click="findOrder()">查询</button>
        </div>
        <div style="height: 50px">
        </div>
        <hr/>
    </div>
    <!-- 页面内容 -->
    <div class="contentBox">
        <div class="list-column1">
            <ul class="list">
                <li class="list-item" v-for="orderInfo in orderInfoList">
                    <a class="link-page" :href="'order_detail.html?setmealId='+orderInfo.setmealId+'&orderId='+orderInfo.orderId">
                        <img class="img-object f-left" :src="orderInfo.img" alt="">
                        <div class="item-body">
                            <h4 class="ellipsis item-title">体检人：{{orderInfo.memberName}}</h4>
                            <p class="ellipsis-more item-desc">预约套餐：{{orderInfo.setmealName}}</p>
                            <p class="ellipsis-more item-desc">预约日期：{{orderInfo.orderDate}}</p>
                            <div>点击查看详情</div>
                        </div>
                    </a>
                </li>
            </ul>
        </div>
    </div>
</div>
<script>
    var vue = new Vue({
        el:'#app',
        data:{
            orderInfoList: {},
            begin:'',
            end:''
        },
        mounted(){
            this.findOrder();
        },
        methods:{
            //查询预约记录
            findOrder (){
                axios.post("/order/getOrderInfoByMemberIdAndDate.do",{begin:this.begin, end:this.end, memberId:id}).then((resp)=>{
                    if(resp.data.flag){
                        this.orderInfoList = resp.data.data;
                    }else {
                        this.$message().error(resp.data.message);
                    }
                });
            }
        }

    });
</script>
</body>